Optimal. Leaf size=74 \[ \frac {3 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac {2 i \sec ^3(c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {3 \tan (c+d x) \sec (c+d x)}{2 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3500, 3768, 3770} \[ \frac {3 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac {2 i \sec ^3(c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {3 \tan (c+d x) \sec (c+d x)}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3500
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=-\frac {2 i \sec ^3(c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {3 \int \sec ^3(c+d x) \, dx}{a^2}\\ &=\frac {3 \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {2 i \sec ^3(c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {3 \int \sec (c+d x) \, dx}{2 a^2}\\ &=\frac {3 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}+\frac {3 \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {2 i \sec ^3(c+d x)}{d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.47, size = 146, normalized size = 1.97 \[ -\frac {\sec ^2(c+d x) \left (2 \sin (c+d x)+8 i \cos (c+d x)+3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 \cos (2 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )-3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{4 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.57, size = 134, normalized size = 1.81 \[ \frac {3 \, {\left (e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \, {\left (e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 6 i \, e^{\left (3 i \, d x + 3 i \, c\right )} - 10 i \, e^{\left (i \, d x + i \, c\right )}}{2 \, {\left (a^{2} d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.90, size = 95, normalized size = 1.28 \[ \frac {\frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{2}} - \frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{2}} - \frac {2 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.37, size = 170, normalized size = 2.30 \[ -\frac {1}{2 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 i}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {1}{2 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{2} d}-\frac {1}{2 a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2 i}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {1}{2 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.61, size = 167, normalized size = 2.26 \[ -\frac {\frac {2 \, {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {4 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + 4 i\right )}}{a^{2} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.93, size = 104, normalized size = 1.41 \[ \frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{a^2}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^2}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,4{}\mathrm {i}}{a^2}+\frac {4{}\mathrm {i}}{a^2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {\int \frac {\sec ^{5}{\left (c + d x \right )}}{\tan ^{2}{\left (c + d x \right )} - 2 i \tan {\left (c + d x \right )} - 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________